package jw.hospital.hosp.enums;

public enum AuthStatusEnum {
    NO_AUTH(0,"未认证"),
    AUTH_RUN(1,"认证中"),
    AUTH_SUCCES(2,"认证成功"),
    AUTH_FAIL(3,"认证失败"),
    ;

    private  Integer status;
    private  String  name;

    AuthStatusEnum(Integer status, String name) {
        this.status = status;
        this.name = name;
    }

    public  static String  getStatusNameByStatus(Integer status){
        AuthStatusEnum[] values = AuthStatusEnum.values();
        //intValue:将Integer类型转换为int类型
        for (AuthStatusEnum value : values) {
            if(status.intValue() == value.getStatus().intValue()){
               return value.getName();
            }
        }
        return "";

    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
